<?php

//print_r($_POST);
 
// username and password sent from form 
print_r($_POST);
//Array ( [action] => organization_distribute_confirm [user1] => 1 [tran_id] => Array ( [0] => 22 [1] => 24 ) [submit] => ç¡®è®¤é€‰ä¸­äº¤æ˜“ )
//return;


$tran_ids=$_POST['tran_id']; 
$user1=$_POST['user1']; 
$org=$_POST['source']; 
if(!isset($tran_ids)||count($tran_ids)==0){header("location:../index.php?page=organization_distribute_confirm&id=".$org."&stat=error&error=badData");
return;}
foreach($tran_ids as $tran_id){
	
	//distributeConfirm($user1,$tran_id,$org);
	//return;
	$r=distributeConfirm($user1,$tran_id,$org);
	//return;
	if(!$r){
	header("location:../index.php?page=organization_distribute_confirm&id=".$org."&stat=error&error=unknown");
		
	}
}

	header("location:../index.php?page=organization_distribute_confirm&id=".$org."&stat=confirmed");


?>